import request from "./base.js"

export function validCode(code, email) {
	return request("/register/validCode", {
		code,
		email
	}, "post")
}


export function register(data) {
	return request("/register", data, "post")
}


export function sendCode(username, email) {
	return request("/register/mailer", {
		type: "注册",
		username,
		email
	})
}


export function hasUser(username) {
	return request("/register/has_user", {
		username,
	})
}



export function hasEmail(email) {
	return request("/register/has_email", {
		email
	})
}
